﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MobileIdeas.MobileTasks.SDK.DAL.DataAccess;

namespace MobileIdeas.MobileTasks.SDK.DAL.Repositories
{
    public class SecurityRepository : ISecurityRepository
    {
        UserDAO userDao;
        PermissionDAO permissionDao;

        public SecurityRepository()
        {
            this.userDao = new UserDAO();
            this.permissionDao = new PermissionDAO();
        }

        public User GetUser(string username, string password, int companyId)
        {
            return this.userDao.GetUser(username, password, companyId);    
        }

        public List<Permission> GetUserPermissions(int userId)
        {
            return this.permissionDao.GetUserPermissions(userId);
        }
    }
}
